package com.edu.study.base.stuCourseWordClean.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.study.base.stuCourseWordClean.mapper.StuCourseWordCleanMapper;
import com.edu.study.base.stuCourseWordClean.domain.StuCourseWordClean;
import com.edu.study.base.stuCourseWordClean.service.IStuCourseWordCleanService;

/**
 * 课程生词学习状态Service业务层处理
 * 
 * @author zw
 * @date 2022-04-13
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class StuCourseWordCleanServiceImpl implements IStuCourseWordCleanService 
{
    @Autowired
    private StuCourseWordCleanMapper stuCourseWordCleanMapper;

    /**
     * 查询课程生词学习状态
     * 
     * @param id 课程生词学习状态ID
     * @return 课程生词学习状态
     */
    @Override
    public StuCourseWordClean selectStuCourseWordCleanById(Long id)
    {
        return stuCourseWordCleanMapper.selectStuCourseWordCleanById(id);
    }

    /**
     * 查询课程生词学习状态列表
     * 
     * @param stuCourseWordClean 课程生词学习状态
     * @return 课程生词学习状态
     */
    @Override
    public List<StuCourseWordClean> selectStuCourseWordCleanList(StuCourseWordClean stuCourseWordClean)
    {
        return stuCourseWordCleanMapper.selectStuCourseWordCleanList(stuCourseWordClean);
    }

    /**
     * 新增课程生词学习状态
     * 
     * @param stuCourseWordClean 课程生词学习状态
     * @return 结果
     */
    @Override
    public int insertStuCourseWordClean(StuCourseWordClean stuCourseWordClean)
    {
        stuCourseWordClean.setCreateTime(DateUtils.getNowDate());
        return stuCourseWordCleanMapper.insertStuCourseWordClean(stuCourseWordClean);
    }

    @Override
    public int insertStuCourseWordCleanList(List<StuCourseWordClean> stuCourseWordCleanList) {
        return stuCourseWordCleanMapper.insertStuCourseWordCleanList(stuCourseWordCleanList);
    }

    /**
     * 修改课程生词学习状态
     * 
     * @param stuCourseWordClean 课程生词学习状态
     * @return 结果
     */
    @Override
    public int updateStuCourseWordClean(StuCourseWordClean stuCourseWordClean)
    {
        return stuCourseWordCleanMapper.updateStuCourseWordClean(stuCourseWordClean);
    }

    /**
     * 批量删除课程生词学习状态
     * 
     * @param ids 需要删除的课程生词学习状态ID
     * @return 结果
     */
    @Override
    public int deleteStuCourseWordCleanByIds(Long[] ids)
    {
        return stuCourseWordCleanMapper.deleteStuCourseWordCleanByIds(ids);
    }

    /**
     * 删除课程生词学习状态信息
     * 
     * @param id 课程生词学习状态ID
     * @return 结果
     */
    @Override
    public int deleteStuCourseWordCleanById(Long id)
    {
        return stuCourseWordCleanMapper.deleteStuCourseWordCleanById(id);
    }
}
